package net.wexoo.onlinedivelog.proxy.person;

import java.util.List;

import net.wexoo.onlinedivelog.dal.person.IPersonDAO;
import net.wexoo.onlinedivelog.entity.person.PersonBean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PersonProxy implements IPersonProxy {

   @Autowired
   private IPersonDAO personDAO;

   @Override
   public PersonBean saveOrUpdate(PersonBean newPerson) {
      return personDAO.saveOrUpdate(newPerson);
   }

   @Override
   public PersonBean login(String login, String password) {
      return personDAO.login(login, password);
   }

   @Override
   public List<PersonBean> getList() {
      return personDAO.getAll();
   }
}
